/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('mm-multiply', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model CollectionAccountInfoDTO {
  channel?: string(name='Channel'),
  gmtCreate?: string(name='GmtCreate'),
  isActive?: boolean(name='IsActive'),
  isConfigured?: boolean(name='IsConfigured'),
}

model Order {
  buyerName?: string(name='BuyerName'),
  buyerPhone?: string(name='BuyerPhone'),
  checkoutSerialNumber?: string(name='CheckoutSerialNumber'),
  discountPrice?: double(name='DiscountPrice'),
  mtBillId?: string(name='MtBillId'),
  orderTime?: string(name='OrderTime'),
  paymentPromotionPrice?: double(name='PaymentPromotionPrice'),
  platformType?: string(name='PlatformType'),
  price?: double(name='Price'),
  saleItemPrice?: double(name='SaleItemPrice'),
  shippingPrice?: double(name='ShippingPrice'),
  status?: string(name='Status'),
  storeId?: string(name='StoreId'),
  orderId?: string(name='orderId'),
}

model PaymentStatement {
  discountAmt?: double(name='DiscountAmt'),
  orderAmt1d?: double(name='OrderAmt1d'),
  orderCnt1d?: long(name='OrderCnt1d'),
  payChannelType?: string(name='PayChannelType'),
  payDate?: string(name='PayDate'),
  returnOrderAmt1d?: double(name='ReturnOrderAmt1d'),
  returnOrderCnt1d?: long(name='ReturnOrderCnt1d'),
  returnServiceAmt1d?: double(name='ReturnServiceAmt1d'),
  serviceAmt1d?: double(name='ServiceAmt1d'),
  settleAmt1d?: double(name='SettleAmt1d'),
}

model PaymentStatementDetails {
  isForward?: string(name='IsForward'),
  orderAmt?: double(name='OrderAmt'),
  orderCd?: string(name='OrderCd'),
  orderDiscountAmt?: double(name='OrderDiscountAmt'),
  orderFromType?: string(name='OrderFromType'),
  orderTime?: string(name='OrderTime'),
  orderType?: string(name='OrderType'),
  payChannelType?: string(name='PayChannelType'),
  paySerialCd?: string(name='PaySerialCd'),
  payToolType?: string(name='PayToolType'),
  platOrderCd?: string(name='PlatOrderCd'),
  returnOrderAmt?: double(name='ReturnOrderAmt'),
  returnPaySerialCd?: string(name='ReturnPaySerialCd'),
  returnServiceAmt?: double(name='ReturnServiceAmt'),
  serviceAmt?: double(name='ServiceAmt'),
}

model ReverseOrder {
  buyerName?: string(name='BuyerName'),
  buyerPhone?: string(name='BuyerPhone'),
  checkoutSerialNumber?: string(name='CheckoutSerialNumber'),
  mtBillId?: string(name='MtBillId'),
  orderTime?: string(name='OrderTime'),
  platformType?: string(name='PlatformType'),
  price?: double(name='Price'),
  reverseOrderId?: string(name='ReverseOrderId'),
  reverseOrderStatus?: string(name='ReverseOrderStatus'),
  reverseOrderTime?: string(name='ReverseOrderTime'),
  status?: string(name='Status'),
  storeId?: string(name='StoreId'),
  orderId?: string(name='orderId'),
}

model AbortContractRequest {
  contractId?: string(name='ContractId'),
  origin?: string(name='Origin'),
}

model AbortContractResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model AbortContractResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AbortContractResponseBody(name='body'),
}

async function abortContractWithOptions(request: AbortContractRequest, runtime: Util.RuntimeOptions): AbortContractResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contractId)) {
    query['ContractId'] = request.contractId;
  }
  if (!Util.isUnset(request.origin)) {
    query['Origin'] = request.origin;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AbortContract',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function abortContract(request: AbortContractRequest): AbortContractResponse {
  var runtime = new Util.RuntimeOptions{};
  return abortContractWithOptions(request, runtime);
}

model ActiveCollectionAccountRequest {
  channel?: string(name='Channel'),
  collectionEnv?: string(name='CollectionEnv'),
  mallId?: string(name='MallId'),
}

model ActiveCollectionAccountResponseBody = {
  activeSuccess?: boolean(name='ActiveSuccess'),
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ActiveCollectionAccountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ActiveCollectionAccountResponseBody(name='body'),
}

async function activeCollectionAccountWithOptions(request: ActiveCollectionAccountRequest, runtime: Util.RuntimeOptions): ActiveCollectionAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.collectionEnv)) {
    query['CollectionEnv'] = request.collectionEnv;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ActiveCollectionAccount',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function activeCollectionAccount(request: ActiveCollectionAccountRequest): ActiveCollectionAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return activeCollectionAccountWithOptions(request, runtime);
}

model AddMallConfigRequest {
  channel?: string(name='Channel'),
  mallId?: string(name='MallId'),
  params?: string(name='Params'),
}

model AddMallConfigResponseBody = {
  code?: long(name='Code'),
  errorMessage?: string(name='ErrorMessage'),
  isConfigureSuccess?: boolean(name='IsConfigureSuccess'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model AddMallConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddMallConfigResponseBody(name='body'),
}

async function addMallConfigWithOptions(request: AddMallConfigRequest, runtime: Util.RuntimeOptions): AddMallConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  if (!Util.isUnset(request.params)) {
    query['Params'] = request.params;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddMallConfig',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addMallConfig(request: AddMallConfigRequest): AddMallConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addMallConfigWithOptions(request, runtime);
}

model ApplyDistributorRequest {
  channelSupplierId?: string(name='ChannelSupplierId'),
  channelSupplierName?: string(name='ChannelSupplierName'),
  contractor?: string(name='Contractor'),
  distributorName?: string(name='DistributorName'),
  entityInfo?: string(name='EntityInfo'),
  industry?: string(name='Industry'),
  phone?: string(name='Phone'),
  preference?: string(name='Preference'),
  scale?: string(name='Scale'),
}

model ApplyDistributorResponseBody = {
  channelSupplierName?: string(name='ChannelSupplierName'),
  code?: string(name='Code'),
  contractor?: string(name='Contractor'),
  distributorId?: string(name='DistributorId'),
  distributorName?: string(name='DistributorName'),
  entityInfo?: string(name='EntityInfo'),
  industry?: string(name='Industry'),
  message?: string(name='Message'),
  phone?: string(name='Phone'),
  preference?: string(name='Preference'),
  requestId?: string(name='RequestId'),
  scale?: string(name='Scale'),
  success?: boolean(name='Success'),
}

model ApplyDistributorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ApplyDistributorResponseBody(name='body'),
}

async function applyDistributorWithOptions(request: ApplyDistributorRequest, runtime: Util.RuntimeOptions): ApplyDistributorResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.channelSupplierId)) {
    body['ChannelSupplierId'] = request.channelSupplierId;
  }
  if (!Util.isUnset(request.channelSupplierName)) {
    body['ChannelSupplierName'] = request.channelSupplierName;
  }
  if (!Util.isUnset(request.contractor)) {
    body['Contractor'] = request.contractor;
  }
  if (!Util.isUnset(request.distributorName)) {
    body['DistributorName'] = request.distributorName;
  }
  if (!Util.isUnset(request.entityInfo)) {
    body['EntityInfo'] = request.entityInfo;
  }
  if (!Util.isUnset(request.industry)) {
    body['Industry'] = request.industry;
  }
  if (!Util.isUnset(request.phone)) {
    body['Phone'] = request.phone;
  }
  if (!Util.isUnset(request.preference)) {
    body['Preference'] = request.preference;
  }
  if (!Util.isUnset(request.scale)) {
    body['Scale'] = request.scale;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyDistributor',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyDistributor(request: ApplyDistributorRequest): ApplyDistributorResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyDistributorWithOptions(request, runtime);
}

model ApplyDistributorMallRequest {
  distributionMallType?: string(name='DistributionMallType'),
}

model ApplyDistributorMallResponseBody = {
  code?: string(name='Code'),
  mallId?: string(name='MallId'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ApplyDistributorMallResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ApplyDistributorMallResponseBody(name='body'),
}

async function applyDistributorMallWithOptions(request: ApplyDistributorMallRequest, runtime: Util.RuntimeOptions): ApplyDistributorMallResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.distributionMallType)) {
    body['DistributionMallType'] = request.distributionMallType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyDistributorMall',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyDistributorMall(request: ApplyDistributorMallRequest): ApplyDistributorMallResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyDistributorMallWithOptions(request, runtime);
}

model CheckAccountRequest {
  account?: string(name='Account'),
  name?: string(name='Name'),
}

model CheckAccountResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  status?: boolean(name='Status'),
  success?: boolean(name='Success'),
}

model CheckAccountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CheckAccountResponseBody(name='body'),
}

async function checkAccountWithOptions(request: CheckAccountRequest, runtime: Util.RuntimeOptions): CheckAccountResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckAccount',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function checkAccount(request: CheckAccountRequest): CheckAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkAccountWithOptions(request, runtime);
}

model CheckDomainDnsTxtRequest {
  businessId?: string(name='BusinessId'),
  domain?: string(name='Domain'),
}

model CheckDomainDnsTxtResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CheckDomainDnsTxtResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CheckDomainDnsTxtResponseBody(name='body'),
}

async function checkDomainDnsTxtWithOptions(request: CheckDomainDnsTxtRequest, runtime: Util.RuntimeOptions): CheckDomainDnsTxtResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckDomainDnsTxt',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function checkDomainDnsTxt(request: CheckDomainDnsTxtRequest): CheckDomainDnsTxtResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkDomainDnsTxtWithOptions(request, runtime);
}

model CheckItemMarketingStatusRequest {
  itemId?: string(name='ItemId'),
  storeId?: string(name='StoreId'),
}

model CheckItemMarketingStatusResponseBody = {
  activityStatus?: boolean(name='ActivityStatus'),
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CheckItemMarketingStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CheckItemMarketingStatusResponseBody(name='body'),
}

async function checkItemMarketingStatusWithOptions(request: CheckItemMarketingStatusRequest, runtime: Util.RuntimeOptions): CheckItemMarketingStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckItemMarketingStatus',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function checkItemMarketingStatus(request: CheckItemMarketingStatusRequest): CheckItemMarketingStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkItemMarketingStatusWithOptions(request, runtime);
}

model CreateBusinessResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateBusinessResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateBusinessResponseBody(name='body'),
}

async function createBusinessWithOptions(runtime: Util.RuntimeOptions): CreateBusinessResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'CreateBusiness',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createBusiness(): CreateBusinessResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBusinessWithOptions(runtime);
}

model CreateCouponTemplateRequest {
  bizId?: string(name='BizId'),
  couponTemplateDTO?: {
    alipayImgUrl?: string(name='AlipayImgUrl'),
    alipayJumpLabel?: string(name='AlipayJumpLabel'),
    alipayJumpTable?: string(name='AlipayJumpTable'),
    alipayJumpUrl?: string(name='AlipayJumpUrl'),
    alipaySendCount?: long(name='AlipaySendCount'),
    channelCode?: string(name='ChannelCode'),
    decreaseMoney?: string(name='DecreaseMoney'),
    decreaseType?: int32(name='DecreaseType'),
    discount?: string(name='Discount'),
    effectiveDelayInterval?: int32(name='EffectiveDelayInterval'),
    effectiveEndTime?: string(name='EffectiveEndTime'),
    effectiveInterval?: int32(name='EffectiveInterval'),
    effectiveStartTime?: string(name='EffectiveStartTime'),
    effectiveType?: int32(name='EffectiveType'),
    id?: string(name='Id'),
    instruction?: string(name='Instruction'),
    itemFixPrice?: string(name='ItemFixPrice'),
    itemSalePrice?: string(name='ItemSalePrice'),
    jumpLabel?: string(name='JumpLabel'),
    jumpTable?: string(name='JumpTable'),
    jumpUrl?: string(name='JumpUrl'),
    maxDecreaseMoney?: string(name='MaxDecreaseMoney'),
    onlineEndTime?: string(name='OnlineEndTime'),
    onlineStartTime?: string(name='OnlineStartTime'),
    originalPriceTag?: boolean(name='OriginalPriceTag'),
    overlay?: boolean(name='Overlay'),
    personLimitCount?: long(name='PersonLimitCount'),
    personTotalCount?: long(name='PersonTotalCount'),
    remark?: string(name='Remark'),
    resourceId?: string(name='ResourceId'),
    restrictType?: int32(name='RestrictType'),
    restrictValue?: string(name='RestrictValue'),
    scopeId?: [ string ](name='ScopeId'),
    scopeName?: string(name='ScopeName'),
    scopeType?: int32(name='ScopeType'),
    startInterval?: string(name='StartInterval'),
    startType?: int32(name='StartType'),
    status?: int32(name='Status'),
    syncTag?: boolean(name='SyncTag'),
    title?: string(name='Title'),
    totalCount?: long(name='TotalCount'),
    type?: int32(name='Type'),
    wechatExt?: string(name='WechatExt'),
    wechatSendCount?: long(name='WechatSendCount'),
  }(name='CouponTemplateDTO'),
}

model CreateCouponTemplateShrinkRequest {
  bizId?: string(name='BizId'),
  couponTemplateDTOShrink?: string(name='CouponTemplateDTO'),
}

model CreateCouponTemplateResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateCouponTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateCouponTemplateResponseBody(name='body'),
}

async function createCouponTemplateWithOptions(tmpReq: CreateCouponTemplateRequest, runtime: Util.RuntimeOptions): CreateCouponTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new CreateCouponTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.couponTemplateDTO)) {
    request.couponTemplateDTOShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.couponTemplateDTO, 'CouponTemplateDTO', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponTemplateDTOShrink)) {
    body['CouponTemplateDTO'] = request.couponTemplateDTOShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateCouponTemplate',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCouponTemplate(request: CreateCouponTemplateRequest): CreateCouponTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCouponTemplateWithOptions(request, runtime);
}

model CreatePointExchangeRuleRequest {
  bizId?: string(name='BizId'),
  couponTemplateIdList?: string(name='CouponTemplateIdList'),
  pointAmount?: long(name='PointAmount'),
  remark?: string(name='Remark'),
  ruleName?: string(name='RuleName'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model CreatePointExchangeRuleResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreatePointExchangeRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreatePointExchangeRuleResponseBody(name='body'),
}

async function createPointExchangeRuleWithOptions(request: CreatePointExchangeRuleRequest, runtime: Util.RuntimeOptions): CreatePointExchangeRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponTemplateIdList)) {
    body['CouponTemplateIdList'] = request.couponTemplateIdList;
  }
  if (!Util.isUnset(request.pointAmount)) {
    body['PointAmount'] = request.pointAmount;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.ruleName)) {
    body['RuleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePointExchangeRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createPointExchangeRule(request: CreatePointExchangeRuleRequest): CreatePointExchangeRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPointExchangeRuleWithOptions(request, runtime);
}

model CreateRainbowDistributionMallResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  mallId?: string(name='MallId'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateRainbowDistributionMallResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateRainbowDistributionMallResponseBody(name='body'),
}

async function createRainbowDistributionMallWithOptions(runtime: Util.RuntimeOptions): CreateRainbowDistributionMallResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'CreateRainbowDistributionMall',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createRainbowDistributionMall(): CreateRainbowDistributionMallResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRainbowDistributionMallWithOptions(runtime);
}

model CreateRelationRequest {
  mallId?: string(name='MallId'),
}

model CreateRelationResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateRelationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateRelationResponseBody(name='body'),
}

async function createRelationWithOptions(request: CreateRelationRequest, runtime: Util.RuntimeOptions): CreateRelationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.mallId)) {
    body['MallId'] = request.mallId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateRelation',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createRelation(request: CreateRelationRequest): CreateRelationResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRelationWithOptions(request, runtime);
}

model CreateShopRequest {
  extInfo?: map[string]string(name='ExtInfo'),
  tbShopDescription?: string(name='TbShopDescription'),
  tbShopId?: string(name='TbShopId'),
  tbShopName?: string(name='TbShopName'),
  token?: string(name='Token'),
  type?: string(name='Type'),
}

model CreateShopShrinkRequest {
  extInfoShrink?: string(name='ExtInfo'),
  tbShopDescription?: string(name='TbShopDescription'),
  tbShopId?: string(name='TbShopId'),
  tbShopName?: string(name='TbShopName'),
  token?: string(name='Token'),
  type?: string(name='Type'),
}

model CreateShopResponseBody = {
  code?: long(name='Code'),
  lmShopId?: string(name='LmShopId'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateShopResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateShopResponseBody(name='body'),
}

async function createShopWithOptions(tmpReq: CreateShopRequest, runtime: Util.RuntimeOptions): CreateShopResponse {
  Util.validateModel(tmpReq);
  var request = new CreateShopShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    query['ExtInfo'] = request.extInfoShrink;
  }
  if (!Util.isUnset(request.tbShopDescription)) {
    query['TbShopDescription'] = request.tbShopDescription;
  }
  if (!Util.isUnset(request.tbShopId)) {
    query['TbShopId'] = request.tbShopId;
  }
  if (!Util.isUnset(request.tbShopName)) {
    query['TbShopName'] = request.tbShopName;
  }
  if (!Util.isUnset(request.token)) {
    query['Token'] = request.token;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateShop',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createShop(request: CreateShopRequest): CreateShopResponse {
  var runtime = new Util.RuntimeOptions{};
  return createShopWithOptions(request, runtime);
}

model CreateTransactionRequest {
  acceptElectronicInvoice?: boolean(name='AcceptElectronicInvoice'),
  address?: string(name='Address'),
  aliasName?: string(name='AliasName'),
  autoInvoice?: boolean(name='AutoInvoice'),
  bankAccount?: string(name='BankAccount'),
  bankName?: string(name='BankName'),
  certName?: string(name='CertName'),
  certNo?: string(name='CertNo'),
  certType?: string(name='CertType'),
  cityCode?: string(name='CityCode'),
  contactMobile?: string(name='ContactMobile'),
  contactName?: string(name='ContactName'),
  contactTag?: string(name='ContactTag'),
  contactType?: string(name='ContactType'),
  districtCode?: string(name='DistrictCode'),
  idType?: string(name='IdType'),
  invoiceAddress?: string(name='InvoiceAddress'),
  invoiceTelephone?: string(name='InvoiceTelephone'),
  isMiniStyle?: string(name='IsMiniStyle'),
  legalCertImage?: string(name='LegalCertImage'),
  legalCertNo?: string(name='LegalCertNo'),
  legalCertType?: string(name='LegalCertType'),
  legalName?: string(name='LegalName'),
  mailAddress?: string(name='MailAddress'),
  mailCityCode?: string(name='MailCityCode'),
  mailDistrictCode?: string(name='MailDistrictCode'),
  mailName?: string(name='MailName'),
  mailProvinceCode?: string(name='MailProvinceCode'),
  mailTelephone?: string(name='MailTelephone'),
  merchantType?: string(name='MerchantType'),
  name?: string(name='Name'),
  onlyInvoiceInfo?: boolean(name='OnlyInvoiceInfo'),
  outDoorImages?: string(name='OutDoorImages'),
  outerMerchantId?: string(name='OuterMerchantId'),
  payLoginId?: string(name='PayLoginId'),
  provinceCode?: string(name='ProvinceCode'),
  scene?: string(name='Scene'),
  sellerId?: string(name='SellerId'),
  servicePhone?: string(name='ServicePhone'),
  signTimeWithIsv?: string(name='SignTimeWithIsv'),
  taxNo?: string(name='TaxNo'),
  taxPayerQualification?: string(name='TaxPayerQualification'),
  taxPayerValidation?: string(name='TaxPayerValidation'),
  title?: string(name='Title'),
  withInvoice?: boolean(name='WithInvoice'),
}

model CreateTransactionResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateTransactionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateTransactionResponseBody(name='body'),
}

async function createTransactionWithOptions(request: CreateTransactionRequest, runtime: Util.RuntimeOptions): CreateTransactionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.acceptElectronicInvoice)) {
    body['AcceptElectronicInvoice'] = request.acceptElectronicInvoice;
  }
  if (!Util.isUnset(request.address)) {
    body['Address'] = request.address;
  }
  if (!Util.isUnset(request.aliasName)) {
    body['AliasName'] = request.aliasName;
  }
  if (!Util.isUnset(request.autoInvoice)) {
    body['AutoInvoice'] = request.autoInvoice;
  }
  if (!Util.isUnset(request.bankAccount)) {
    body['BankAccount'] = request.bankAccount;
  }
  if (!Util.isUnset(request.bankName)) {
    body['BankName'] = request.bankName;
  }
  if (!Util.isUnset(request.certName)) {
    body['CertName'] = request.certName;
  }
  if (!Util.isUnset(request.certNo)) {
    body['CertNo'] = request.certNo;
  }
  if (!Util.isUnset(request.certType)) {
    body['CertType'] = request.certType;
  }
  if (!Util.isUnset(request.cityCode)) {
    body['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.contactMobile)) {
    body['ContactMobile'] = request.contactMobile;
  }
  if (!Util.isUnset(request.contactName)) {
    body['ContactName'] = request.contactName;
  }
  if (!Util.isUnset(request.contactTag)) {
    body['ContactTag'] = request.contactTag;
  }
  if (!Util.isUnset(request.contactType)) {
    body['ContactType'] = request.contactType;
  }
  if (!Util.isUnset(request.districtCode)) {
    body['DistrictCode'] = request.districtCode;
  }
  if (!Util.isUnset(request.idType)) {
    body['IdType'] = request.idType;
  }
  if (!Util.isUnset(request.invoiceAddress)) {
    body['InvoiceAddress'] = request.invoiceAddress;
  }
  if (!Util.isUnset(request.invoiceTelephone)) {
    body['InvoiceTelephone'] = request.invoiceTelephone;
  }
  if (!Util.isUnset(request.isMiniStyle)) {
    body['IsMiniStyle'] = request.isMiniStyle;
  }
  if (!Util.isUnset(request.legalCertImage)) {
    body['LegalCertImage'] = request.legalCertImage;
  }
  if (!Util.isUnset(request.legalCertNo)) {
    body['LegalCertNo'] = request.legalCertNo;
  }
  if (!Util.isUnset(request.legalCertType)) {
    body['LegalCertType'] = request.legalCertType;
  }
  if (!Util.isUnset(request.legalName)) {
    body['LegalName'] = request.legalName;
  }
  if (!Util.isUnset(request.mailAddress)) {
    body['MailAddress'] = request.mailAddress;
  }
  if (!Util.isUnset(request.mailCityCode)) {
    body['MailCityCode'] = request.mailCityCode;
  }
  if (!Util.isUnset(request.mailDistrictCode)) {
    body['MailDistrictCode'] = request.mailDistrictCode;
  }
  if (!Util.isUnset(request.mailName)) {
    body['MailName'] = request.mailName;
  }
  if (!Util.isUnset(request.mailProvinceCode)) {
    body['MailProvinceCode'] = request.mailProvinceCode;
  }
  if (!Util.isUnset(request.mailTelephone)) {
    body['MailTelephone'] = request.mailTelephone;
  }
  if (!Util.isUnset(request.merchantType)) {
    body['MerchantType'] = request.merchantType;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.onlyInvoiceInfo)) {
    body['OnlyInvoiceInfo'] = request.onlyInvoiceInfo;
  }
  if (!Util.isUnset(request.outDoorImages)) {
    body['OutDoorImages'] = request.outDoorImages;
  }
  if (!Util.isUnset(request.outerMerchantId)) {
    body['OuterMerchantId'] = request.outerMerchantId;
  }
  if (!Util.isUnset(request.payLoginId)) {
    body['PayLoginId'] = request.payLoginId;
  }
  if (!Util.isUnset(request.provinceCode)) {
    body['ProvinceCode'] = request.provinceCode;
  }
  if (!Util.isUnset(request.scene)) {
    body['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.sellerId)) {
    body['SellerId'] = request.sellerId;
  }
  if (!Util.isUnset(request.servicePhone)) {
    body['ServicePhone'] = request.servicePhone;
  }
  if (!Util.isUnset(request.signTimeWithIsv)) {
    body['SignTimeWithIsv'] = request.signTimeWithIsv;
  }
  if (!Util.isUnset(request.taxNo)) {
    body['TaxNo'] = request.taxNo;
  }
  if (!Util.isUnset(request.taxPayerQualification)) {
    body['TaxPayerQualification'] = request.taxPayerQualification;
  }
  if (!Util.isUnset(request.taxPayerValidation)) {
    body['TaxPayerValidation'] = request.taxPayerValidation;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.withInvoice)) {
    body['WithInvoice'] = request.withInvoice;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateTransaction',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createTransaction(request: CreateTransactionRequest): CreateTransactionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTransactionWithOptions(request, runtime);
}

model DeletePointExchangeRuleRequest {
  bizId?: string(name='BizId'),
  ruleIdList?: string(name='RuleIdList'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model DeletePointExchangeRuleResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeletePointExchangeRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePointExchangeRuleResponseBody(name='body'),
}

async function deletePointExchangeRuleWithOptions(request: DeletePointExchangeRuleRequest, runtime: Util.RuntimeOptions): DeletePointExchangeRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.ruleIdList)) {
    body['RuleIdList'] = request.ruleIdList;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeletePointExchangeRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePointExchangeRule(request: DeletePointExchangeRuleRequest): DeletePointExchangeRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePointExchangeRuleWithOptions(request, runtime);
}

model DeletePointGrantRuleRequest {
  bizId?: string(name='BizId'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model DeletePointGrantRuleResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeletePointGrantRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePointGrantRuleResponseBody(name='body'),
}

async function deletePointGrantRuleWithOptions(request: DeletePointGrantRuleRequest, runtime: Util.RuntimeOptions): DeletePointGrantRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeletePointGrantRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePointGrantRule(request: DeletePointGrantRuleRequest): DeletePointGrantRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePointGrantRuleWithOptions(request, runtime);
}

model DownShelfItemsRequest {
  itemIds?: string(name='ItemIds'),
  storeId?: string(name='StoreId'),
}

model DownShelfItemsResponseBody = {
  code?: string(name='Code'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DownShelfItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DownShelfItemsResponseBody(name='body'),
}

async function downShelfItemsWithOptions(request: DownShelfItemsRequest, runtime: Util.RuntimeOptions): DownShelfItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemIds)) {
    body['ItemIds'] = request.itemIds;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DownShelfItems',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function downShelfItems(request: DownShelfItemsRequest): DownShelfItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return downShelfItemsWithOptions(request, runtime);
}

model EditSkusRequest {
  descOption?: string(name='DescOption'),
  firstPicUrl?: string(name='FirstPicUrl'),
  imageList?: [ 
    {
      sortOrder?: string(name='SortOrder'),
      url?: string(name='Url'),
    }
  ](name='ImageList'),
  itemId?: string(name='ItemId'),
  picUrl?: string(name='PicUrl'),
  skus?: [ 
    {
      currencyCode?: string(name='CurrencyCode'),
      image?: string(name='Image'),
      markPrice?: long(name='MarkPrice'),
      sellableQuantity?: long(name='SellableQuantity'),
      skuDesc?: string(name='SkuDesc'),
      skuId?: string(name='SkuId'),
      skuPrice?: long(name='SkuPrice'),
      skuTitle?: string(name='SkuTitle'),
    }
  ](name='Skus'),
  storeId?: string(name='StoreId'),
  title?: string(name='Title'),
}

model EditSkusResponseBody = {
  code?: string(name='Code'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model EditSkusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EditSkusResponseBody(name='body'),
}

async function editSkusWithOptions(request: EditSkusRequest, runtime: Util.RuntimeOptions): EditSkusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.descOption)) {
    body['DescOption'] = request.descOption;
  }
  if (!Util.isUnset(request.firstPicUrl)) {
    body['FirstPicUrl'] = request.firstPicUrl;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.imageList)) {
    bodyFlat['ImageList'] = request.imageList;
  }
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.picUrl)) {
    body['PicUrl'] = request.picUrl;
  }
  if (!Util.isUnset(request.skus)) {
    bodyFlat['Skus'] = request.skus;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'EditSkus',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function editSkus(request: EditSkusRequest): EditSkusResponse {
  var runtime = new Util.RuntimeOptions{};
  return editSkusWithOptions(request, runtime);
}

model EnableTemporaryDomainRequest {
  businessId?: string(name='BusinessId'),
}

model EnableTemporaryDomainResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model EnableTemporaryDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EnableTemporaryDomainResponseBody(name='body'),
}

async function enableTemporaryDomainWithOptions(request: EnableTemporaryDomainRequest, runtime: Util.RuntimeOptions): EnableTemporaryDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableTemporaryDomain',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function enableTemporaryDomain(request: EnableTemporaryDomainRequest): EnableTemporaryDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableTemporaryDomainWithOptions(request, runtime);
}

model GetBusinessAnalysisRequest {
  bizDate?: string(name='BizDate'),
  bizId?: string(name='BizId'),
  dateType?: string(name='DateType'),
  groupTags?: string(name='GroupTags'),
  indexTags?: string(name='IndexTags'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model GetBusinessAnalysisResponseBody = {
  bizDate?: string(name='BizDate'),
  code?: string(name='Code'),
  dateType?: string(name='DateType'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  indexTrendModels?: [ 
    {
      bizDate?: string(name='BizDate'),
      indexName?: string(name='IndexName'),
      indexTag?: string(name='IndexTag'),
      indexValue?: double(name='IndexValue'),
    }
  ](name='IndexTrendModels'),
  mallId?: string(name='MallId'),
  message?: string(name='Message'),
  regionModels?: [ 
    {
      groups?: [ 
        {
          currentIndex?: string(name='CurrentIndex'),
          groupName?: string(name='GroupName'),
          groupTag?: string(name='GroupTag'),
        }
      ](name='Groups'),
      regionName?: string(name='RegionName'),
      regionTag?: string(name='RegionTag'),
    }
  ](name='RegionModels'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetBusinessAnalysisResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetBusinessAnalysisResponseBody(name='body'),
}

async function getBusinessAnalysisWithOptions(request: GetBusinessAnalysisRequest, runtime: Util.RuntimeOptions): GetBusinessAnalysisResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizDate)) {
    body['BizDate'] = request.bizDate;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.dateType)) {
    body['DateType'] = request.dateType;
  }
  if (!Util.isUnset(request.groupTags)) {
    body['GroupTags'] = request.groupTags;
  }
  if (!Util.isUnset(request.indexTags)) {
    body['IndexTags'] = request.indexTags;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetBusinessAnalysis',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getBusinessAnalysis(request: GetBusinessAnalysisRequest): GetBusinessAnalysisResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBusinessAnalysisWithOptions(request, runtime);
}

model GetContractContentRequest {
  contractId?: readable(name='ContractId'),
}

model GetContractContentResponseBody = {
  baseType?: string(name='BaseType'),
  code?: long(name='Code'),
  downloadUrl?: string(name='DownloadUrl'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
  success?: boolean(name='Success'),
}

model GetContractContentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetContractContentResponseBody(name='body'),
}

async function getContractContentWithOptions(request: GetContractContentRequest, runtime: Util.RuntimeOptions): GetContractContentResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetContractContent',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getContractContent(request: GetContractContentRequest): GetContractContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getContractContentWithOptions(request, runtime);
}

model GetContractProgressRequest {
  contractId?: string(name='ContractId'),
}

model GetContractProgressResponseBody = {
  code?: long(name='Code'),
  contractProgressModels?: [ 
    {
      action?: string(name='Action'),
      actionDescription?: string(name='ActionDescription'),
      contractId?: string(name='ContractId'),
      contractName?: string(name='ContractName'),
      contractStatus?: string(name='ContractStatus'),
      extInfo?: map[string]any(name='ExtInfo'),
      id?: string(name='Id'),
      time?: string(name='Time'),
    }
  ](name='ContractProgressModels'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetContractProgressResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetContractProgressResponseBody(name='body'),
}

async function getContractProgressWithOptions(request: GetContractProgressRequest, runtime: Util.RuntimeOptions): GetContractProgressResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetContractProgress',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getContractProgress(request: GetContractProgressRequest): GetContractProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return getContractProgressWithOptions(request, runtime);
}

model GetCouponItemSaleStdRequest {
  bizDate?: string(name='BizDate'),
  bizId?: string(name='BizId'),
  couponPlatformType?: int32(name='CouponPlatformType'),
  couponTemplateCd?: string(name='CouponTemplateCd'),
  orderByField?: string(name='OrderByField'),
  orderByMethod?: string(name='OrderByMethod'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model GetCouponItemSaleStdResponseBody = {
  code?: string(name='Code'),
  currentPage?: int32(name='CurrentPage'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  models?: [ 
    {
      couponTemplateCd?: string(name='CouponTemplateCd'),
      cusCntStd?: long(name='CusCntStd'),
      itemCntStd?: long(name='ItemCntStd'),
      mmItemName?: string(name='MmItemName'),
    }
  ](name='Models'),
  orderByField?: string(name='OrderByField'),
  orderByMethod?: string(name='OrderByMethod'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  recordsPerPage?: int32(name='RecordsPerPage'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
  totalPages?: int32(name='TotalPages'),
  totalRecords?: int32(name='TotalRecords'),
}

model GetCouponItemSaleStdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetCouponItemSaleStdResponseBody(name='body'),
}

async function getCouponItemSaleStdWithOptions(request: GetCouponItemSaleStdRequest, runtime: Util.RuntimeOptions): GetCouponItemSaleStdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizDate)) {
    body['BizDate'] = request.bizDate;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponPlatformType)) {
    body['CouponPlatformType'] = request.couponPlatformType;
  }
  if (!Util.isUnset(request.couponTemplateCd)) {
    body['CouponTemplateCd'] = request.couponTemplateCd;
  }
  if (!Util.isUnset(request.orderByField)) {
    body['OrderByField'] = request.orderByField;
  }
  if (!Util.isUnset(request.orderByMethod)) {
    body['OrderByMethod'] = request.orderByMethod;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetCouponItemSaleStd',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getCouponItemSaleStd(request: GetCouponItemSaleStdRequest): GetCouponItemSaleStdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCouponItemSaleStdWithOptions(request, runtime);
}

model GetCouponSaleStdRequest {
  bizDate?: string(name='BizDate'),
  bizId?: string(name='BizId'),
  couponPlatformType?: int32(name='CouponPlatformType'),
  couponTemplateCd?: string(name='CouponTemplateCd'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model GetCouponSaleStdResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  models?: [ 
    {
      costEfficiencyRate?: string(name='CostEfficiencyRate'),
      couponAmtStd?: string(name='CouponAmtStd'),
      couponItemCntStd?: long(name='CouponItemCntStd'),
      couponNewCusCntStd?: long(name='CouponNewCusCntStd'),
      couponOldCusCntStd?: long(name='CouponOldCusCntStd'),
      couponOrderSaleAmtStd?: string(name='CouponOrderSaleAmtStd'),
      couponTemplateCd?: string(name='CouponTemplateCd'),
      couponUnitPrice?: string(name='CouponUnitPrice'),
    }
  ](name='Models'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetCouponSaleStdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetCouponSaleStdResponseBody(name='body'),
}

async function getCouponSaleStdWithOptions(request: GetCouponSaleStdRequest, runtime: Util.RuntimeOptions): GetCouponSaleStdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizDate)) {
    body['BizDate'] = request.bizDate;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponPlatformType)) {
    body['CouponPlatformType'] = request.couponPlatformType;
  }
  if (!Util.isUnset(request.couponTemplateCd)) {
    body['CouponTemplateCd'] = request.couponTemplateCd;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetCouponSaleStd',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getCouponSaleStd(request: GetCouponSaleStdRequest): GetCouponSaleStdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCouponSaleStdWithOptions(request, runtime);
}

model GetDeductionInfoResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  payChannelModels?: [ 
    {
      agreementNo?: string(name='AgreementNo'),
      bizId?: string(name='BizId'),
      deletion?: int32(name='Deletion'),
      extInfo?: string(name='ExtInfo'),
      id?: long(name='Id'),
      invalidTime?: string(name='InvalidTime'),
      isSign?: int32(name='IsSign'),
      payChannel?: string(name='PayChannel'),
      payUserId?: string(name='PayUserId'),
      signModifyTime?: string(name='SignModifyTime'),
      signTime?: string(name='SignTime'),
      tenantId?: string(name='TenantId'),
      transactionType?: string(name='TransactionType'),
      validTime?: string(name='ValidTime'),
    }
  ](name='PayChannelModels'),
  requestId?: string(name='RequestId'),
  status?: boolean(name='Status'),
}

model GetDeductionInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeductionInfoResponseBody(name='body'),
}

async function getDeductionInfoWithOptions(runtime: Util.RuntimeOptions): GetDeductionInfoResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetDeductionInfo',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeductionInfo(): GetDeductionInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeductionInfoWithOptions(runtime);
}

model GetDeductionUrlResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  status?: boolean(name='Status'),
  URL?: string(name='URL'),
}

model GetDeductionUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeductionUrlResponseBody(name='body'),
}

async function getDeductionUrlWithOptions(runtime: Util.RuntimeOptions): GetDeductionUrlResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetDeductionUrl',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeductionUrl(): GetDeductionUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeductionUrlWithOptions(runtime);
}

model GetDistributorSignatureUrlResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  url?: string(name='Url'),
}

model GetDistributorSignatureUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDistributorSignatureUrlResponseBody(name='body'),
}

async function getDistributorSignatureUrlWithOptions(runtime: Util.RuntimeOptions): GetDistributorSignatureUrlResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetDistributorSignatureUrl',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDistributorSignatureUrl(): GetDistributorSignatureUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDistributorSignatureUrlWithOptions(runtime);
}

model GetDivisionListRequest {
  divisionCode?: string(name='DivisionCode'),
}

model GetDivisionListResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  regionMap?: map[string]any(name='RegionMap'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetDivisionListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDivisionListResponseBody(name='body'),
}

async function getDivisionListWithOptions(request: GetDivisionListRequest, runtime: Util.RuntimeOptions): GetDivisionListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDivisionList',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDivisionList(request: GetDivisionListRequest): GetDivisionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDivisionListWithOptions(request, runtime);
}

model GetDomainRequest {
  businessId?: string(name='BusinessId'),
}

model GetDomainResponseBody = {
  code?: int32(name='Code'),
  customDomainStatus?: string(name='CustomDomainStatus'),
  dnsCname?: string(name='DnsCname'),
  domain?: string(name='Domain'),
  gmtModified?: string(name='GmtModified'),
  hasTls?: boolean(name='HasTls'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  temporaryDomainStatus?: string(name='TemporaryDomainStatus'),
  tlsExpire?: long(name='TlsExpire'),
}

model GetDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDomainResponseBody(name='body'),
}

async function getDomainWithOptions(request: GetDomainRequest, runtime: Util.RuntimeOptions): GetDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDomain',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDomain(request: GetDomainRequest): GetDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDomainWithOptions(request, runtime);
}

model GetDomainDnsTxtRequest {
  businessId?: string(name='BusinessId'),
  domain?: string(name='Domain'),
}

model GetDomainDnsTxtResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  value?: string(name='Value'),
}

model GetDomainDnsTxtResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDomainDnsTxtResponseBody(name='body'),
}

async function getDomainDnsTxtWithOptions(request: GetDomainDnsTxtRequest, runtime: Util.RuntimeOptions): GetDomainDnsTxtResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDomainDnsTxt',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDomainDnsTxt(request: GetDomainDnsTxtRequest): GetDomainDnsTxtResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDomainDnsTxtWithOptions(request, runtime);
}

model GetItemDetailRequest {
  itemId?: string(name='ItemId'),
  storeId?: string(name='StoreId'),
}

model GetItemDetailResponseBody = {
  activityStatus?: string(name='ActivityStatus'),
  catagoryLeafId?: string(name='CatagoryLeafId'),
  code?: string(name='Code'),
  descOption?: string(name='DescOption'),
  descPath?: string(name='DescPath'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  firstPicUrl?: string(name='FirstPicUrl'),
  images?: [ 
    {
      isMain?: int32(name='IsMain'),
      sortOrder?: int32(name='SortOrder'),
      type?: int32(name='Type'),
      url?: string(name='Url'),
    }
  ](name='Images'),
  itemId?: string(name='ItemId'),
  itemParamsInfo?: string(name='ItemParamsInfo'),
  message?: string(name='Message'),
  picUrl?: string(name='PicUrl'),
  requestId?: string(name='RequestId'),
  skus?: [ 
    {
      currencyCode?: string(name='CurrencyCode'),
      image?: string(name='Image'),
      itemId?: string(name='ItemId'),
      markPrice?: long(name='MarkPrice'),
      sellableQuantity?: long(name='SellableQuantity'),
      skuDesc?: string(name='SkuDesc'),
      skuId?: string(name='SkuId'),
      skuPrice?: long(name='SkuPrice'),
      skuTitle?: string(name='SkuTitle'),
    }
  ](name='Skus'),
  sourceChannel?: int32(name='SourceChannel'),
  sourceChannelName?: string(name='SourceChannelName'),
  status?: int32(name='Status'),
  storeId?: string(name='StoreId'),
  success?: boolean(name='Success'),
  tbItemId?: string(name='TbItemId'),
  title?: string(name='Title'),
}

model GetItemDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetItemDetailResponseBody(name='body'),
}

async function getItemDetailWithOptions(request: GetItemDetailRequest, runtime: Util.RuntimeOptions): GetItemDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetItemDetail',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getItemDetail(request: GetItemDetailRequest): GetItemDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getItemDetailWithOptions(request, runtime);
}

model GetMallConfigRequest {
  channel?: string(name='Channel'),
  mallId?: string(name='MallId'),
}

model GetMallConfigResponseBody = {
  channel?: string(name='Channel'),
  code?: long(name='Code'),
  isConfigured?: boolean(name='IsConfigured'),
  message?: string(name='Message'),
  params?: string(name='Params'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetMallConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMallConfigResponseBody(name='body'),
}

async function getMallConfigWithOptions(request: GetMallConfigRequest, runtime: Util.RuntimeOptions): GetMallConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMallConfig',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMallConfig(request: GetMallConfigRequest): GetMallConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMallConfigWithOptions(request, runtime);
}

model GetOssSignatureRequest {
  bizId?: string(name='BizId'),
  fileName?: string(name='FileName'),
  size?: long(name='Size'),
}

model GetOssSignatureResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  ossSignature?: {
    accessKeyId?: string(name='AccessKeyId'),
    dir?: string(name='Dir'),
    encodedPolicy?: string(name='EncodedPolicy'),
    expire?: string(name='Expire'),
    host?: string(name='Host'),
    resourceId?: string(name='ResourceId'),
    signature?: string(name='Signature'),
  }(name='OssSignature'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetOssSignatureResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetOssSignatureResponseBody(name='body'),
}

async function getOssSignatureWithOptions(request: GetOssSignatureRequest, runtime: Util.RuntimeOptions): GetOssSignatureResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.size)) {
    body['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetOssSignature',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getOssSignature(request: GetOssSignatureRequest): GetOssSignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOssSignatureWithOptions(request, runtime);
}

model GetPointCommonRuleRequest {
  bizId?: string(name='BizId'),
}

model GetPointCommonRuleResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  pointCommonRuleDTO?: {
    effectiveInterval?: int32(name='EffectiveInterval'),
    effectiveTime?: string(name='EffectiveTime'),
    effectiveTimeUnit?: string(name='EffectiveTimeUnit'),
    effectiveType?: int32(name='EffectiveType'),
    limitInterval?: long(name='LimitInterval'),
    limitStatus?: int32(name='LimitStatus'),
    updateTime?: string(name='UpdateTime'),
  }(name='PointCommonRuleDTO'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model GetPointCommonRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPointCommonRuleResponseBody(name='body'),
}

async function getPointCommonRuleWithOptions(request: GetPointCommonRuleRequest, runtime: Util.RuntimeOptions): GetPointCommonRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPointCommonRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPointCommonRule(request: GetPointCommonRuleRequest): GetPointCommonRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPointCommonRuleWithOptions(request, runtime);
}

model GetTaobaoLoginUrlRequest {
  type?: string(name='Type'),
}

model GetTaobaoLoginUrlResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  url?: string(name='Url'),
}

model GetTaobaoLoginUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetTaobaoLoginUrlResponseBody(name='body'),
}

async function getTaobaoLoginUrlWithOptions(request: GetTaobaoLoginUrlRequest, runtime: Util.RuntimeOptions): GetTaobaoLoginUrlResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTaobaoLoginUrl',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getTaobaoLoginUrl(request: GetTaobaoLoginUrlRequest): GetTaobaoLoginUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTaobaoLoginUrlWithOptions(request, runtime);
}

model GetTokenInfoRequest {
  token?: string(name='Token'),
}

model GetTokenInfoResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  tbNick?: string(name='TbNick'),
  tbShopId?: string(name='TbShopId'),
  tbShopName?: string(name='TbShopName'),
}

model GetTokenInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetTokenInfoResponseBody(name='body'),
}

async function getTokenInfoWithOptions(request: GetTokenInfoRequest, runtime: Util.RuntimeOptions): GetTokenInfoResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTokenInfo',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getTokenInfo(request: GetTokenInfoRequest): GetTokenInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTokenInfoWithOptions(request, runtime);
}

model GetUserStatusResponseBody = {
  applyStatus?: int32(name='ApplyStatus'),
  buyStatus?: int32(name='BuyStatus'),
  code?: long(name='Code'),
  contractStatus?: int32(name='ContractStatus'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  saleLink?: string(name='SaleLink'),
  success?: boolean(name='Success'),
}

model GetUserStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetUserStatusResponseBody(name='body'),
}

async function getUserStatusWithOptions(runtime: Util.RuntimeOptions): GetUserStatusResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetUserStatus',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getUserStatus(): GetUserStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserStatusWithOptions(runtime);
}

model ListAlipayActivityDetailRequest {
  activityIds?: string(name='ActivityIds'),
  bizId?: string(name='BizId'),
}

model ListAlipayActivityDetailResponseBody = {
  code?: string(name='Code'),
  couponTemplates?: [ 
    {
      activityId?: string(name='ActivityId'),
      effectiveInfo?: string(name='EffectiveInfo'),
    }
  ](name='CouponTemplates'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListAlipayActivityDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAlipayActivityDetailResponseBody(name='body'),
}

async function listAlipayActivityDetailWithOptions(request: ListAlipayActivityDetailRequest, runtime: Util.RuntimeOptions): ListAlipayActivityDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.activityIds)) {
    body['ActivityIds'] = request.activityIds;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListAlipayActivityDetail',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAlipayActivityDetail(request: ListAlipayActivityDetailRequest): ListAlipayActivityDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlipayActivityDetailWithOptions(request, runtime);
}

model ListAvailableRuleCouponTemplatesRequest {
  bizId?: string(name='BizId'),
  ruleId?: string(name='RuleId'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model ListAvailableRuleCouponTemplatesResponseBody = {
  code?: string(name='Code'),
  couponTemplateListDTOs?: [ 
    {
      applyCount?: long(name='ApplyCount'),
      effectiveInfo?: string(name='EffectiveInfo'),
      id?: string(name='Id'),
      info?: string(name='Info'),
      remark?: string(name='Remark'),
      scopeInfo?: string(name='ScopeInfo'),
      status?: string(name='Status'),
      surplusCount?: long(name='SurplusCount'),
      title?: string(name='Title'),
      type?: string(name='Type'),
      useCount?: long(name='UseCount'),
    }
  ](name='CouponTemplateListDTOs'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListAvailableRuleCouponTemplatesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAvailableRuleCouponTemplatesResponseBody(name='body'),
}

async function listAvailableRuleCouponTemplatesWithOptions(request: ListAvailableRuleCouponTemplatesRequest, runtime: Util.RuntimeOptions): ListAvailableRuleCouponTemplatesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.ruleId)) {
    body['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListAvailableRuleCouponTemplates',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAvailableRuleCouponTemplates(request: ListAvailableRuleCouponTemplatesRequest): ListAvailableRuleCouponTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAvailableRuleCouponTemplatesWithOptions(request, runtime);
}

model ListBindShopResponseBody = {
  code?: long(name='Code'),
  list?: [ 
    {
      approver?: string(name='Approver'),
      dealTime?: string(name='DealTime'),
      extInfo?: string(name='ExtInfo'),
      lmShopId?: long(name='LmShopId'),
      operatorId?: string(name='OperatorId'),
      pinYin?: string(name='PinYin'),
      response?: string(name='Response'),
      status?: string(name='Status'),
      storeId?: string(name='StoreId'),
      tbPayAccount?: string(name='TbPayAccount'),
      tbShopDescription?: string(name='TbShopDescription'),
      tbShopId?: long(name='TbShopId'),
      tbShopName?: string(name='TbShopName'),
    }
  ](name='List'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListBindShopResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListBindShopResponseBody(name='body'),
}

async function listBindShopWithOptions(runtime: Util.RuntimeOptions): ListBindShopResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListBindShop',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listBindShop(): ListBindShopResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBindShopWithOptions(runtime);
}

model ListBusinessResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  rainbowUserBusinessModels?: [ 
    {
      appType?: string(name='AppType'),
      businessId?: string(name='BusinessId'),
      name?: string(name='Name'),
      tpBusinessId?: string(name='TpBusinessId'),
      tpUserId?: string(name='TpUserId'),
      type?: int32(name='Type'),
      validEndTime?: string(name='ValidEndTime'),
      validStartTime?: string(name='ValidStartTime'),
    }
  ](name='RainbowUserBusinessModels'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListBusinessResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListBusinessResponseBody(name='body'),
}

async function listBusinessWithOptions(runtime: Util.RuntimeOptions): ListBusinessResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListBusiness',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listBusiness(): ListBusinessResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBusinessWithOptions(runtime);
}

model ListChannelSupplierResponseBody = {
  channelSupplierList?: [ 
    {
      channelSupplierId?: string(name='ChannelSupplierId'),
      channelSupplierName?: string(name='ChannelSupplierName'),
    }
  ](name='ChannelSupplierList'),
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListChannelSupplierResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListChannelSupplierResponseBody(name='body'),
}

async function listChannelSupplierWithOptions(runtime: Util.RuntimeOptions): ListChannelSupplierResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListChannelSupplier',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listChannelSupplier(): ListChannelSupplierResponse {
  var runtime = new Util.RuntimeOptions{};
  return listChannelSupplierWithOptions(runtime);
}

model ListCollectionAccountInfoRequest {
  collectionEnv?: string(name='CollectionEnv'),
  mallId?: string(name='MallId'),
}

model ListCollectionAccountInfoResponseBody = {
  code?: long(name='Code'),
  infoDTOList?: [
    CollectionAccountInfoDTO
  ](name='InfoDTOList'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListCollectionAccountInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCollectionAccountInfoResponseBody(name='body'),
}

async function listCollectionAccountInfoWithOptions(request: ListCollectionAccountInfoRequest, runtime: Util.RuntimeOptions): ListCollectionAccountInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.collectionEnv)) {
    query['CollectionEnv'] = request.collectionEnv;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCollectionAccountInfo',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCollectionAccountInfo(request: ListCollectionAccountInfoRequest): ListCollectionAccountInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCollectionAccountInfoWithOptions(request, runtime);
}

model ListContractRequest {
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  relation?: string(name='Relation'),
  status?: string(name='Status'),
}

model ListContractResponseBody = {
  code?: long(name='Code'),
  contractModels?: [ 
    {
      contractExtInfo?: map[string]any(name='ContractExtInfo'),
      contractId?: string(name='ContractId'),
      contractName?: string(name='ContractName'),
      createTime?: string(name='CreateTime'),
      expireTime?: string(name='ExpireTime'),
      extInfo?: map[string]any(name='ExtInfo'),
      firstParty?: string(name='FirstParty'),
      firstPartyId?: string(name='FirstPartyId'),
      secondParty?: string(name='SecondParty'),
      secondPartyId?: string(name='SecondPartyId'),
      signStatus?: string(name='SignStatus'),
      startTime?: string(name='StartTime'),
    }
  ](name='ContractModels'),
  currentPage?: int32(name='CurrentPage'),
  message?: string(name='Message'),
  recordsPerPage?: int32(name='RecordsPerPage'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
  totalPages?: int32(name='TotalPages'),
  totalRecords?: int32(name='TotalRecords'),
}

model ListContractResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListContractResponseBody(name='body'),
}

async function listContractWithOptions(request: ListContractRequest, runtime: Util.RuntimeOptions): ListContractResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListContract',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listContract(request: ListContractRequest): ListContractResponse {
  var runtime = new Util.RuntimeOptions{};
  return listContractWithOptions(request, runtime);
}

model ListCouponTemplateRequest {
  bizId?: string(name='BizId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  queryCouponTemplateListDTO?: {
    alipayQuery?: boolean(name='AlipayQuery'),
    couponTitle?: string(name='CouponTitle'),
    couponType?: int32(name='CouponType'),
    endTime?: string(name='EndTime'),
    startTime?: string(name='StartTime'),
    status?: string(name='Status'),
  }(name='QueryCouponTemplateListDTO'),
}

model ListCouponTemplateShrinkRequest {
  bizId?: string(name='BizId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  queryCouponTemplateListDTOShrink?: string(name='QueryCouponTemplateListDTO'),
}

model ListCouponTemplateResponseBody = {
  code?: string(name='Code'),
  couponTemplates?: [ 
    {
      activityId?: string(name='ActivityId'),
      applyCount?: long(name='ApplyCount'),
      belongTypeList?: [ string ](name='BelongTypeList'),
      decreaseType?: int32(name='DecreaseType'),
      effectiveDelayInterval?: int32(name='EffectiveDelayInterval'),
      effectiveInfo?: string(name='EffectiveInfo'),
      effectiveInterval?: int32(name='EffectiveInterval'),
      effectiveType?: int32(name='EffectiveType'),
      id?: string(name='Id'),
      info?: string(name='Info'),
      isOuterCouponTemplate?: boolean(name='IsOuterCouponTemplate'),
      itemName?: string(name='ItemName'),
      maxDecreaseMoney?: string(name='MaxDecreaseMoney'),
      remark?: string(name='Remark'),
      scopeInfo?: string(name='ScopeInfo'),
      shortEndDate?: string(name='ShortEndDate'),
      shortStartDate?: string(name='ShortStartDate'),
      startType?: int32(name='StartType'),
      startValue?: string(name='StartValue'),
      status?: string(name='Status'),
      surplusCount?: long(name='SurplusCount'),
      title?: string(name='Title'),
      type?: string(name='Type'),
      useCount?: long(name='UseCount'),
      value?: string(name='Value'),
    }
  ](name='CouponTemplates'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListCouponTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCouponTemplateResponseBody(name='body'),
}

async function listCouponTemplateWithOptions(tmpReq: ListCouponTemplateRequest, runtime: Util.RuntimeOptions): ListCouponTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new ListCouponTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.queryCouponTemplateListDTO)) {
    request.queryCouponTemplateListDTOShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.queryCouponTemplateListDTO, 'QueryCouponTemplateListDTO', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryCouponTemplateListDTOShrink)) {
    body['QueryCouponTemplateListDTO'] = request.queryCouponTemplateListDTOShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListCouponTemplate',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCouponTemplate(request: ListCouponTemplateRequest): ListCouponTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCouponTemplateWithOptions(request, runtime);
}

model ListDeductionResponseBody = {
  code?: long(name='Code'),
  lmShopSupplierModels?: [ 
    {
      commissionStatus?: string(name='CommissionStatus'),
      creator?: string(name='Creator'),
      description?: string(name='Description'),
      endAt?: string(name='EndAt'),
      extInfo?: string(name='ExtInfo'),
      itemService?: boolean(name='ItemService'),
      lmShopId?: long(name='LmShopId'),
      lmSupplierId?: long(name='LmSupplierId'),
      pinYin?: string(name='PinYin'),
      startAt?: string(name='StartAt'),
      status?: string(name='Status'),
      tbSellerId?: long(name='TbSellerId'),
      title?: string(name='Title'),
      type?: string(name='Type'),
    }
  ](name='LmShopSupplierModels'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListDeductionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeductionResponseBody(name='body'),
}

async function listDeductionWithOptions(runtime: Util.RuntimeOptions): ListDeductionResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListDeduction',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeduction(): ListDeductionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeductionWithOptions(runtime);
}

model ListDistributorMallRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListDistributorMallResponseBody = {
  code?: string(name='Code'),
  distributorMallList?: [ 
    {
      channelSupplierList?: [ 
        {
          channelSupplierId?: string(name='ChannelSupplierId'),
          channelSupplierName?: string(name='ChannelSupplierName'),
          distributionMallCode?: string(name='DistributionMallCode'),
        }
      ](name='ChannelSupplierList'),
      distributionMallId?: string(name='DistributionMallId'),
      distributionMallName?: string(name='DistributionMallName'),
      distributionMallType?: string(name='DistributionMallType'),
      distributorId?: string(name='DistributorId'),
      endDate?: string(name='EndDate'),
      remark?: string(name='Remark'),
      startDate?: string(name='StartDate'),
      status?: string(name='Status'),
    }
  ](name='DistributorMallList'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListDistributorMallResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDistributorMallResponseBody(name='body'),
}

async function listDistributorMallWithOptions(request: ListDistributorMallRequest, runtime: Util.RuntimeOptions): ListDistributorMallResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDistributorMall',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDistributorMall(request: ListDistributorMallRequest): ListDistributorMallResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDistributorMallWithOptions(request, runtime);
}

model ListOrderRequest {
  businessId?: string(name='BusinessId'),
  buyerName?: string(name='BuyerName'),
  buyerPhone?: string(name='BuyerPhone'),
  checkoutSerialNumber?: string(name='CheckoutSerialNumber'),
  endTime?: string(name='EndTime'),
  mock?: boolean(name='Mock'),
  mtBillId?: string(name='MtBillId'),
  orderId?: string(name='OrderId'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  platformType?: string(name='PlatformType'),
  startTime?: string(name='StartTime'),
  status?: string(name='Status'),
}

model ListOrderResponseBody = {
  orders?: [
    Order
  ](name='Orders'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListOrderResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListOrderResponseBody(name='body'),
}

async function listOrderWithOptions(request: ListOrderRequest, runtime: Util.RuntimeOptions): ListOrderResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListOrder',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listOrder(request: ListOrderRequest): ListOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return listOrderWithOptions(request, runtime);
}

model ListPaymentStatementRequest {
  mallId?: string(name='MallId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  payDateEnd?: string(name='PayDateEnd'),
  payDateStart?: string(name='PayDateStart'),
}

model ListPaymentStatementResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  statementDTOList?: [
    PaymentStatement
  ](name='StatementDTOList'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListPaymentStatementResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPaymentStatementResponseBody(name='body'),
}

async function listPaymentStatementWithOptions(request: ListPaymentStatementRequest, runtime: Util.RuntimeOptions): ListPaymentStatementResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.payDateEnd)) {
    query['PayDateEnd'] = request.payDateEnd;
  }
  if (!Util.isUnset(request.payDateStart)) {
    query['PayDateStart'] = request.payDateStart;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPaymentStatement',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPaymentStatement(request: ListPaymentStatementRequest): ListPaymentStatementResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPaymentStatementWithOptions(request, runtime);
}

model ListPaymentStatementDetailsRequest {
  mallId?: string(name='MallId'),
  orderCd?: string(name='OrderCd'),
  orderDateEnd?: string(name='OrderDateEnd'),
  orderDateStart?: string(name='OrderDateStart'),
  orderFrom?: string(name='OrderFrom'),
  orderType?: string(name='OrderType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  payChannelType?: string(name='PayChannelType'),
  platOrderCd?: string(name='PlatOrderCd'),
}

model ListPaymentStatementDetailsResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  statementDetailsDTOList?: [
    PaymentStatementDetails
  ](name='StatementDetailsDTOList'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListPaymentStatementDetailsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPaymentStatementDetailsResponseBody(name='body'),
}

async function listPaymentStatementDetailsWithOptions(request: ListPaymentStatementDetailsRequest, runtime: Util.RuntimeOptions): ListPaymentStatementDetailsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  if (!Util.isUnset(request.orderCd)) {
    query['OrderCd'] = request.orderCd;
  }
  if (!Util.isUnset(request.orderDateEnd)) {
    query['OrderDateEnd'] = request.orderDateEnd;
  }
  if (!Util.isUnset(request.orderDateStart)) {
    query['OrderDateStart'] = request.orderDateStart;
  }
  if (!Util.isUnset(request.orderFrom)) {
    query['OrderFrom'] = request.orderFrom;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.payChannelType)) {
    query['PayChannelType'] = request.payChannelType;
  }
  if (!Util.isUnset(request.platOrderCd)) {
    query['PlatOrderCd'] = request.platOrderCd;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPaymentStatementDetails',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPaymentStatementDetails(request: ListPaymentStatementDetailsRequest): ListPaymentStatementDetailsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPaymentStatementDetailsWithOptions(request, runtime);
}

model ListPointExchangeRulesRequest {
  bizId?: string(name='BizId'),
  endTime?: string(name='EndTime'),
  orderByField?: string(name='OrderByField'),
  orderByMethod?: string(name='OrderByMethod'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  searchKeyword?: string(name='SearchKeyword'),
  startTime?: string(name='StartTime'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model ListPointExchangeRulesResponseBody = {
  code?: string(name='Code'),
  currentPage?: int32(name='CurrentPage'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  orderByField?: string(name='OrderByField'),
  orderByMethod?: string(name='OrderByMethod'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  pointExchangeRuleDTOList?: [ 
    {
      couponTemplateIdList?: [ string ](name='CouponTemplateIdList'),
      createTime?: string(name='CreateTime'),
      modifiedTime?: string(name='ModifiedTime'),
      pointAmount?: long(name='PointAmount'),
      remark?: string(name='Remark'),
      ruleId?: string(name='RuleId'),
      ruleName?: string(name='RuleName'),
    }
  ](name='PointExchangeRuleDTOList'),
  recordsPerPage?: int32(name='RecordsPerPage'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
  totalPages?: int32(name='TotalPages'),
  totalRecords?: int32(name='TotalRecords'),
}

model ListPointExchangeRulesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPointExchangeRulesResponseBody(name='body'),
}

async function listPointExchangeRulesWithOptions(request: ListPointExchangeRulesRequest, runtime: Util.RuntimeOptions): ListPointExchangeRulesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.orderByField)) {
    body['OrderByField'] = request.orderByField;
  }
  if (!Util.isUnset(request.orderByMethod)) {
    body['OrderByMethod'] = request.orderByMethod;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.searchKeyword)) {
    body['SearchKeyword'] = request.searchKeyword;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPointExchangeRules',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPointExchangeRules(request: ListPointExchangeRulesRequest): ListPointExchangeRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPointExchangeRulesWithOptions(request, runtime);
}

model ListReverseOrderRequest {
  businessId?: string(name='BusinessId'),
  buyerName?: string(name='BuyerName'),
  buyerPhone?: string(name='BuyerPhone'),
  checkoutSerialNumber?: string(name='CheckoutSerialNumber'),
  endTime?: string(name='EndTime'),
  mtBillId?: string(name='MtBillId'),
  orderId?: string(name='OrderId'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  platformType?: string(name='PlatformType'),
  reverseOrderId?: string(name='ReverseOrderId'),
  reverseOrderStatus?: string(name='ReverseOrderStatus'),
  startTime?: string(name='StartTime'),
  status?: string(name='Status'),
  supplierId?: string(name='SupplierId'),
}

model ListReverseOrderResponseBody = {
  orders?: [
    ReverseOrder
  ](name='Orders'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListReverseOrderResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListReverseOrderResponseBody(name='body'),
}

async function listReverseOrderWithOptions(request: ListReverseOrderRequest, runtime: Util.RuntimeOptions): ListReverseOrderResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListReverseOrder',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listReverseOrder(request: ListReverseOrderRequest): ListReverseOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return listReverseOrderWithOptions(request, runtime);
}

model ListRuleCouponTemplatesRequest {
  bizId?: string(name='BizId'),
  ruleId?: string(name='RuleId'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model ListRuleCouponTemplatesResponseBody = {
  code?: string(name='Code'),
  couponTemplateListDTOs?: [ 
    {
      applyCount?: long(name='ApplyCount'),
      effectiveInfo?: string(name='EffectiveInfo'),
      id?: string(name='Id'),
      info?: string(name='Info'),
      remark?: string(name='Remark'),
      scopeInfo?: string(name='ScopeInfo'),
      status?: string(name='Status'),
      surplusCount?: long(name='SurplusCount'),
      title?: string(name='Title'),
      type?: string(name='Type'),
      useCount?: long(name='UseCount'),
    }
  ](name='CouponTemplateListDTOs'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListRuleCouponTemplatesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListRuleCouponTemplatesResponseBody(name='body'),
}

async function listRuleCouponTemplatesWithOptions(request: ListRuleCouponTemplatesRequest, runtime: Util.RuntimeOptions): ListRuleCouponTemplatesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.ruleId)) {
    body['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListRuleCouponTemplates',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listRuleCouponTemplates(request: ListRuleCouponTemplatesRequest): ListRuleCouponTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRuleCouponTemplatesWithOptions(request, runtime);
}

model ListSettlementStatusRequest {
  merchantType?: string(name='MerchantType'),
  statusType?: string(name='StatusType'),
}

model ListSettlementStatusResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  settlementStatuses?: [ 
    {
      extInfo?: string(name='ExtInfo'),
      status?: string(name='Status'),
      statusType?: string(name='StatusType'),
    }
  ](name='SettlementStatuses'),
  success?: boolean(name='Success'),
}

model ListSettlementStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListSettlementStatusResponseBody(name='body'),
}

async function listSettlementStatusWithOptions(request: ListSettlementStatusRequest, runtime: Util.RuntimeOptions): ListSettlementStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.merchantType)) {
    body['MerchantType'] = request.merchantType;
  }
  if (!Util.isUnset(request.statusType)) {
    body['StatusType'] = request.statusType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListSettlementStatus',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listSettlementStatus(request: ListSettlementStatusRequest): ListSettlementStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSettlementStatusWithOptions(request, runtime);
}

model ListShopResponseBody = {
  code?: long(name='Code'),
  list?: [ 
    {
      creator?: string(name='Creator'),
      description?: string(name='Description'),
      lmShopId?: long(name='LmShopId'),
      status?: string(name='Status'),
      storeId?: long(name='StoreId'),
      title?: string(name='Title'),
      type?: string(name='Type'),
      validateEndTime?: long(name='ValidateEndTime'),
    }
  ](name='List'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  versionName?: string(name='VersionName'),
}

model ListShopResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListShopResponseBody(name='body'),
}

async function listShopWithOptions(runtime: Util.RuntimeOptions): ListShopResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListShop',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listShop(): ListShopResponse {
  var runtime = new Util.RuntimeOptions{};
  return listShopWithOptions(runtime);
}

model ListStoreItemsRequest {
  channelOptionItemId?: string(name='ChannelOptionItemId'),
  endEnterWarehouseTime?: string(name='EndEnterWarehouseTime'),
  itemCatagoryId?: string(name='ItemCatagoryId'),
  itemGroupId?: string(name='ItemGroupId'),
  itemId?: string(name='ItemId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  startEnterWarehouseTime?: string(name='StartEnterWarehouseTime'),
  status?: int32(name='Status'),
  storeId?: string(name='StoreId'),
  title?: string(name='Title'),
}

model ListStoreItemsResponseBody = {
  code?: string(name='Code'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  storeItemsModels?: [ 
    {
      catagoryLeafId?: string(name='CatagoryLeafId'),
      descPath?: string(name='DescPath'),
      enterWarehouseTime?: string(name='EnterWarehouseTime'),
      exceptMessage?: string(name='ExceptMessage'),
      itemChannelSaleModels?: [ 
        {
          channelSaleId?: string(name='ChannelSaleId'),
          channelSaleName?: string(name='ChannelSaleName'),
          channelSaleQuantity?: string(name='ChannelSaleQuantity'),
        }
      ](name='ItemChannelSaleModels'),
      itemId?: string(name='ItemId'),
      maxMarkPrice?: long(name='MaxMarkPrice'),
      maxPrice?: long(name='MaxPrice'),
      minMarkPrice?: long(name='MinMarkPrice'),
      minPrice?: long(name='MinPrice'),
      picUrl?: string(name='PicUrl'),
      sourceChannel?: int32(name='SourceChannel'),
      status?: int32(name='Status'),
      stockQuantity?: long(name='StockQuantity'),
      storeId?: string(name='StoreId'),
      tbItemId?: string(name='TbItemId'),
      title?: string(name='Title'),
      upShelfTime?: string(name='UpShelfTime'),
      updateTime?: string(name='UpdateTime'),
    }
  ](name='StoreItemsModels'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListStoreItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListStoreItemsResponseBody(name='body'),
}

async function listStoreItemsWithOptions(request: ListStoreItemsRequest, runtime: Util.RuntimeOptions): ListStoreItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.channelOptionItemId)) {
    body['ChannelOptionItemId'] = request.channelOptionItemId;
  }
  if (!Util.isUnset(request.endEnterWarehouseTime)) {
    body['EndEnterWarehouseTime'] = request.endEnterWarehouseTime;
  }
  if (!Util.isUnset(request.itemCatagoryId)) {
    body['ItemCatagoryId'] = request.itemCatagoryId;
  }
  if (!Util.isUnset(request.itemGroupId)) {
    body['ItemGroupId'] = request.itemGroupId;
  }
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startEnterWarehouseTime)) {
    body['StartEnterWarehouseTime'] = request.startEnterWarehouseTime;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListStoreItems',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listStoreItems(request: ListStoreItemsRequest): ListStoreItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listStoreItemsWithOptions(request, runtime);
}

model ListStoresResponseBody = {
  code?: string(name='Code'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  storeModels?: [ 
    {
      storeId?: string(name='StoreId'),
      title?: string(name='Title'),
    }
  ](name='StoreModels'),
  success?: boolean(name='Success'),
}

model ListStoresResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListStoresResponseBody(name='body'),
}

async function listStoresWithOptions(runtime: Util.RuntimeOptions): ListStoresResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListStores',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listStores(): ListStoresResponse {
  var runtime = new Util.RuntimeOptions{};
  return listStoresWithOptions(runtime);
}

model ListTransactionRequest {
  status?: int32(name='Status'),
}

model ListTransactionResponseBody = {
  code?: long(name='Code'),
  list?: [ 
    {
      lmShopId?: long(name='LmShopId'),
      securityStatus?: int32(name='SecurityStatus'),
      tbPayAccount?: string(name='TbPayAccount'),
      tbSellerId?: long(name='TbSellerId'),
      tbSellerNick?: string(name='TbSellerNick'),
      tbShopDescription?: string(name='TbShopDescription'),
      tbShopId?: long(name='TbShopId'),
      tbShopName?: string(name='TbShopName'),
    }
  ](name='List'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ListTransactionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListTransactionResponseBody(name='body'),
}

async function listTransactionWithOptions(request: ListTransactionRequest, runtime: Util.RuntimeOptions): ListTransactionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTransaction',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTransaction(request: ListTransactionRequest): ListTransactionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTransactionWithOptions(request, runtime);
}

model ModifyDistributorMallRequest {
  distributorMallDescription?: string(name='DistributorMallDescription'),
  distributorMallId?: string(name='DistributorMallId'),
  distributorMallName?: string(name='DistributorMallName'),
}

model ModifyDistributorMallResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ModifyDistributorMallResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyDistributorMallResponseBody(name='body'),
}

async function modifyDistributorMallWithOptions(request: ModifyDistributorMallRequest, runtime: Util.RuntimeOptions): ModifyDistributorMallResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.distributorMallDescription)) {
    body['DistributorMallDescription'] = request.distributorMallDescription;
  }
  if (!Util.isUnset(request.distributorMallId)) {
    body['DistributorMallId'] = request.distributorMallId;
  }
  if (!Util.isUnset(request.distributorMallName)) {
    body['DistributorMallName'] = request.distributorMallName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDistributorMall',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyDistributorMall(request: ModifyDistributorMallRequest): ModifyDistributorMallResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDistributorMallWithOptions(request, runtime);
}

model ModifyItemRequest {
  itemIdsJson?: string(name='ItemIdsJson'),
  mallId?: string(name='MallId'),
}

model ModifyItemResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ModifyItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyItemResponseBody(name='body'),
}

async function modifyItemWithOptions(request: ModifyItemRequest, runtime: Util.RuntimeOptions): ModifyItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.itemIdsJson)) {
    query['ItemIdsJson'] = request.itemIdsJson;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyItem',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyItem(request: ModifyItemRequest): ModifyItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyItemWithOptions(request, runtime);
}

model ModifyShopRequest {
  description?: string(name='Description'),
  storeId?: string(name='StoreId'),
  title?: string(name='Title'),
}

model ModifyShopResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ModifyShopResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyShopResponseBody(name='body'),
}

async function modifyShopWithOptions(request: ModifyShopRequest, runtime: Util.RuntimeOptions): ModifyShopResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.storeId)) {
    query['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyShop',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyShop(request: ModifyShopRequest): ModifyShopResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyShopWithOptions(request, runtime);
}

model QueryCouponTemplateCountDetailRequest {
  bizId?: string(name='BizId'),
  couponTemplateId?: long(name='CouponTemplateId'),
  queryTag?: string(name='QueryTag'),
}

model QueryCouponTemplateCountDetailResponseBody = {
  code?: string(name='Code'),
  couponTemplateCountList?: [ 
    {
      applyCount?: long(name='ApplyCount'),
      surplusCount?: long(name='SurplusCount'),
      type?: string(name='Type'),
      useCount?: long(name='UseCount'),
    }
  ](name='CouponTemplateCountList'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model QueryCouponTemplateCountDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryCouponTemplateCountDetailResponseBody(name='body'),
}

async function queryCouponTemplateCountDetailWithOptions(request: QueryCouponTemplateCountDetailRequest, runtime: Util.RuntimeOptions): QueryCouponTemplateCountDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponTemplateId)) {
    body['CouponTemplateId'] = request.couponTemplateId;
  }
  if (!Util.isUnset(request.queryTag)) {
    body['QueryTag'] = request.queryTag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryCouponTemplateCountDetail',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCouponTemplateCountDetail(request: QueryCouponTemplateCountDetailRequest): QueryCouponTemplateCountDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCouponTemplateCountDetailWithOptions(request, runtime);
}

model QueryCouponTemplateDetailRequest {
  bizId?: string(name='BizId'),
  queryCouponTemplateDetailDTO?: {
    id?: string(name='Id'),
  }(name='QueryCouponTemplateDetailDTO'),
}

model QueryCouponTemplateDetailShrinkRequest {
  bizId?: string(name='BizId'),
  queryCouponTemplateDetailDTOShrink?: string(name='QueryCouponTemplateDetailDTO'),
}

model QueryCouponTemplateDetailResponseBody = {
  code?: string(name='Code'),
  couponTemplateDTO?: {
    alipayImgUrl?: string(name='AlipayImgUrl'),
    alipayJumpLabel?: string(name='AlipayJumpLabel'),
    alipayJumpTable?: string(name='AlipayJumpTable'),
    alipayJumpUrl?: string(name='AlipayJumpUrl'),
    alipaySendCount?: long(name='AlipaySendCount'),
    channelCode?: string(name='ChannelCode'),
    decreaseMoney?: string(name='DecreaseMoney'),
    decreaseType?: int32(name='DecreaseType'),
    discount?: string(name='Discount'),
    effectiveDelayInterval?: int32(name='EffectiveDelayInterval'),
    effectiveEndTime?: string(name='EffectiveEndTime'),
    effectiveInterval?: int32(name='EffectiveInterval'),
    effectiveStartTime?: string(name='EffectiveStartTime'),
    effectiveType?: int32(name='EffectiveType'),
    id?: string(name='Id'),
    instruction?: string(name='Instruction'),
    itemFixPrice?: string(name='ItemFixPrice'),
    itemSalePrice?: string(name='ItemSalePrice'),
    jumpLabel?: string(name='JumpLabel'),
    jumpTable?: string(name='JumpTable'),
    jumpUrl?: string(name='JumpUrl'),
    maxDecreaseMoney?: string(name='MaxDecreaseMoney'),
    onlineEndTime?: string(name='OnlineEndTime'),
    onlineStartTime?: string(name='OnlineStartTime'),
    originalPriceTag?: boolean(name='OriginalPriceTag'),
    overlay?: boolean(name='Overlay'),
    personLimitCount?: long(name='PersonLimitCount'),
    personTotalCount?: long(name='PersonTotalCount'),
    remark?: string(name='Remark'),
    restrictType?: int32(name='RestrictType'),
    restrictValue?: string(name='RestrictValue'),
    scopeId?: [ string ](name='ScopeId'),
    scopeName?: string(name='ScopeName'),
    scopeType?: int32(name='ScopeType'),
    startInterval?: string(name='StartInterval'),
    startType?: int32(name='StartType'),
    status?: int32(name='Status'),
    syncTag?: boolean(name='SyncTag'),
    title?: string(name='Title'),
    totalCount?: long(name='TotalCount'),
    type?: int32(name='Type'),
    wechatExt?: string(name='WechatExt'),
    wechatSendCount?: long(name='WechatSendCount'),
  }(name='CouponTemplateDTO'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model QueryCouponTemplateDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryCouponTemplateDetailResponseBody(name='body'),
}

async function queryCouponTemplateDetailWithOptions(tmpReq: QueryCouponTemplateDetailRequest, runtime: Util.RuntimeOptions): QueryCouponTemplateDetailResponse {
  Util.validateModel(tmpReq);
  var request = new QueryCouponTemplateDetailShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.queryCouponTemplateDetailDTO)) {
    request.queryCouponTemplateDetailDTOShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.queryCouponTemplateDetailDTO, 'QueryCouponTemplateDetailDTO', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.queryCouponTemplateDetailDTOShrink)) {
    body['QueryCouponTemplateDetailDTO'] = request.queryCouponTemplateDetailDTOShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryCouponTemplateDetail',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryCouponTemplateDetail(request: QueryCouponTemplateDetailRequest): QueryCouponTemplateDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCouponTemplateDetailWithOptions(request, runtime);
}

model QueryPointGrantRuleRequest {
  bizId?: string(name='BizId'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model QueryPointGrantRuleResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  pointGrantRuleDTO?: {
    gmtModified?: string(name='GmtModified'),
    pointAmount?: long(name='PointAmount'),
    startAmount?: double(name='StartAmount'),
    status?: long(name='Status'),
    totalPointAmount?: long(name='TotalPointAmount'),
    type?: string(name='Type'),
  }(name='PointGrantRuleDTO'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model QueryPointGrantRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryPointGrantRuleResponseBody(name='body'),
}

async function queryPointGrantRuleWithOptions(request: QueryPointGrantRuleRequest, runtime: Util.RuntimeOptions): QueryPointGrantRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryPointGrantRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryPointGrantRule(request: QueryPointGrantRuleRequest): QueryPointGrantRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryPointGrantRuleWithOptions(request, runtime);
}

model RemoveDomainRequest {
  businessId?: string(name='BusinessId'),
  domain?: string(name='Domain'),
}

model RemoveDomainResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model RemoveDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveDomainResponseBody(name='body'),
}

async function removeDomainWithOptions(request: RemoveDomainRequest, runtime: Util.RuntimeOptions): RemoveDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveDomain',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeDomain(request: RemoveDomainRequest): RemoveDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeDomainWithOptions(request, runtime);
}

model SetDomainRequest {
  businessId?: string(name='BusinessId'),
  domain?: string(name='Domain'),
  tlsCert?: string(name='TlsCert'),
  tlsKey?: string(name='TlsKey'),
}

model SetDomainResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SetDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetDomainResponseBody(name='body'),
}

async function setDomainWithOptions(request: SetDomainRequest, runtime: Util.RuntimeOptions): SetDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDomain',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setDomain(request: SetDomainRequest): SetDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDomainWithOptions(request, runtime);
}

model SignContractRequest {
  contractId?: string(name='ContractId'),
  origin?: string(name='Origin'),
  signContent?: string(name='SignContent'),
}

model SignContractResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SignContractResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SignContractResponseBody(name='body'),
}

async function signContractWithOptions(request: SignContractRequest, runtime: Util.RuntimeOptions): SignContractResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.contractId)) {
    query['ContractId'] = request.contractId;
  }
  if (!Util.isUnset(request.origin)) {
    query['Origin'] = request.origin;
  }
  if (!Util.isUnset(request.signContent)) {
    query['SignContent'] = request.signContent;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SignContract',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function signContract(request: SignContractRequest): SignContractResponse {
  var runtime = new Util.RuntimeOptions{};
  return signContractWithOptions(request, runtime);
}

model SyncItemsResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SyncItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SyncItemsResponseBody(name='body'),
}

async function syncItemsWithOptions(runtime: Util.RuntimeOptions): SyncItemsResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'SyncItems',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function syncItems(): SyncItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return syncItemsWithOptions(runtime);
}

model SyncPaymentConfigRequest {
  channel?: string(name='Channel'),
  mallId?: string(name='MallId'),
}

model SyncPaymentConfigResponseBody = {
  code?: long(name='Code'),
  message?: string(name='Message'),
  params?: string(name='Params'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  syncSuccess?: boolean(name='SyncSuccess'),
}

model SyncPaymentConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SyncPaymentConfigResponseBody(name='body'),
}

async function syncPaymentConfigWithOptions(request: SyncPaymentConfigRequest, runtime: Util.RuntimeOptions): SyncPaymentConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SyncPaymentConfig',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function syncPaymentConfig(request: SyncPaymentConfigRequest): SyncPaymentConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return syncPaymentConfigWithOptions(request, runtime);
}

model UpShelfItemsRequest {
  itemIds?: string(name='ItemIds'),
  storeId?: string(name='StoreId'),
}

model UpShelfItemsResponseBody = {
  code?: string(name='Code'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpShelfItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpShelfItemsResponseBody(name='body'),
}

async function upShelfItemsWithOptions(request: UpShelfItemsRequest, runtime: Util.RuntimeOptions): UpShelfItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemIds)) {
    body['ItemIds'] = request.itemIds;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpShelfItems',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function upShelfItems(request: UpShelfItemsRequest): UpShelfItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return upShelfItemsWithOptions(request, runtime);
}

model UpdateCouponTemplateRequest {
  bizId?: string(name='BizId'),
  couponTemplateDTO?: {
    alipayImgUrl?: string(name='AlipayImgUrl'),
    alipayJumpLabel?: string(name='AlipayJumpLabel'),
    alipayJumpTable?: string(name='AlipayJumpTable'),
    alipayJumpUrl?: string(name='AlipayJumpUrl'),
    alipaySendCount?: long(name='AlipaySendCount'),
    channelCode?: string(name='ChannelCode'),
    decreaseMoney?: string(name='DecreaseMoney'),
    decreaseType?: int32(name='DecreaseType'),
    discount?: string(name='Discount'),
    effectiveDelayInterval?: int32(name='EffectiveDelayInterval'),
    effectiveEndTime?: string(name='EffectiveEndTime'),
    effectiveInterval?: int32(name='EffectiveInterval'),
    effectiveStartTime?: string(name='EffectiveStartTime'),
    effectiveType?: int32(name='EffectiveType'),
    id?: string(name='Id'),
    instruction?: string(name='Instruction'),
    itemFixPrice?: string(name='ItemFixPrice'),
    itemSalePrice?: string(name='ItemSalePrice'),
    jumpLabel?: string(name='JumpLabel'),
    jumpTable?: string(name='JumpTable'),
    jumpUrl?: string(name='JumpUrl'),
    maxDecreaseMoney?: string(name='MaxDecreaseMoney'),
    onlineEndTime?: string(name='OnlineEndTime'),
    onlineStartTime?: string(name='OnlineStartTime'),
    originalPriceTag?: boolean(name='OriginalPriceTag'),
    overlay?: boolean(name='Overlay'),
    personLimitCount?: long(name='PersonLimitCount'),
    personTotalCount?: long(name='PersonTotalCount'),
    remark?: string(name='Remark'),
    resourceId?: string(name='ResourceId'),
    restrictType?: int32(name='RestrictType'),
    restrictValue?: string(name='RestrictValue'),
    scopeId?: [ string ](name='ScopeId'),
    scopeName?: string(name='ScopeName'),
    scopeType?: int32(name='ScopeType'),
    startInterval?: string(name='StartInterval'),
    startType?: int32(name='StartType'),
    status?: int32(name='Status'),
    syncTag?: boolean(name='SyncTag'),
    title?: string(name='Title'),
    totalCount?: long(name='TotalCount'),
    type?: int32(name='Type'),
    wechatExt?: string(name='WechatExt'),
    wechatSendCount?: long(name='WechatSendCount'),
  }(name='CouponTemplateDTO'),
}

model UpdateCouponTemplateShrinkRequest {
  bizId?: string(name='BizId'),
  couponTemplateDTOShrink?: string(name='CouponTemplateDTO'),
}

model UpdateCouponTemplateResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateCouponTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateCouponTemplateResponseBody(name='body'),
}

async function updateCouponTemplateWithOptions(tmpReq: UpdateCouponTemplateRequest, runtime: Util.RuntimeOptions): UpdateCouponTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateCouponTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.couponTemplateDTO)) {
    request.couponTemplateDTOShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.couponTemplateDTO, 'CouponTemplateDTO', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponTemplateDTOShrink)) {
    body['CouponTemplateDTO'] = request.couponTemplateDTOShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateCouponTemplate',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateCouponTemplate(request: UpdateCouponTemplateRequest): UpdateCouponTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCouponTemplateWithOptions(request, runtime);
}

model UpdateCouponTemplateStatusRequest {
  bizId?: string(name='BizId'),
  couponTemplateStatusDTO?: {
    id?: string(name='Id'),
    status?: int32(name='Status'),
  }(name='CouponTemplateStatusDTO'),
}

model UpdateCouponTemplateStatusShrinkRequest {
  bizId?: string(name='BizId'),
  couponTemplateStatusDTOShrink?: string(name='CouponTemplateStatusDTO'),
}

model UpdateCouponTemplateStatusResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateCouponTemplateStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateCouponTemplateStatusResponseBody(name='body'),
}

async function updateCouponTemplateStatusWithOptions(tmpReq: UpdateCouponTemplateStatusRequest, runtime: Util.RuntimeOptions): UpdateCouponTemplateStatusResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateCouponTemplateStatusShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.couponTemplateStatusDTO)) {
    request.couponTemplateStatusDTOShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.couponTemplateStatusDTO, 'CouponTemplateStatusDTO', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponTemplateStatusDTOShrink)) {
    body['CouponTemplateStatusDTO'] = request.couponTemplateStatusDTOShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateCouponTemplateStatus',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateCouponTemplateStatus(request: UpdateCouponTemplateStatusRequest): UpdateCouponTemplateStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCouponTemplateStatusWithOptions(request, runtime);
}

model UpdateMallConfigRequest {
  channel?: string(name='Channel'),
  mallId?: string(name='MallId'),
  params?: string(name='Params'),
}

model UpdateMallConfigResponseBody = {
  code?: long(name='Code'),
  errorMessage?: string(name='ErrorMessage'),
  isConfigureSuccess?: boolean(name='IsConfigureSuccess'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateMallConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateMallConfigResponseBody(name='body'),
}

async function updateMallConfigWithOptions(request: UpdateMallConfigRequest, runtime: Util.RuntimeOptions): UpdateMallConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.mallId)) {
    query['MallId'] = request.mallId;
  }
  if (!Util.isUnset(request.params)) {
    query['Params'] = request.params;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateMallConfig',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateMallConfig(request: UpdateMallConfigRequest): UpdateMallConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateMallConfigWithOptions(request, runtime);
}

model UpdatePointCommonRuleRequest {
  bizId?: string(name='BizId'),
  effectiveInterval?: int32(name='EffectiveInterval'),
  effectiveTime?: string(name='EffectiveTime'),
  effectiveTimeUnit?: string(name='EffectiveTimeUnit'),
  effectiveType?: int32(name='EffectiveType'),
  limitInterval?: long(name='LimitInterval'),
  limitStatus?: int32(name='LimitStatus'),
}

model UpdatePointCommonRuleResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdatePointCommonRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdatePointCommonRuleResponseBody(name='body'),
}

async function updatePointCommonRuleWithOptions(request: UpdatePointCommonRuleRequest, runtime: Util.RuntimeOptions): UpdatePointCommonRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.effectiveInterval)) {
    body['EffectiveInterval'] = request.effectiveInterval;
  }
  if (!Util.isUnset(request.effectiveTime)) {
    body['EffectiveTime'] = request.effectiveTime;
  }
  if (!Util.isUnset(request.effectiveTimeUnit)) {
    body['EffectiveTimeUnit'] = request.effectiveTimeUnit;
  }
  if (!Util.isUnset(request.effectiveType)) {
    body['EffectiveType'] = request.effectiveType;
  }
  if (!Util.isUnset(request.limitInterval)) {
    body['LimitInterval'] = request.limitInterval;
  }
  if (!Util.isUnset(request.limitStatus)) {
    body['LimitStatus'] = request.limitStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdatePointCommonRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updatePointCommonRule(request: UpdatePointCommonRuleRequest): UpdatePointCommonRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePointCommonRuleWithOptions(request, runtime);
}

model UpdatePointExchangeRuleRequest {
  bizId?: string(name='BizId'),
  couponTemplateIdList?: string(name='CouponTemplateIdList'),
  pointAmount?: long(name='PointAmount'),
  remark?: string(name='Remark'),
  ruleId?: string(name='RuleId'),
  ruleName?: string(name='RuleName'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model UpdatePointExchangeRuleResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdatePointExchangeRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdatePointExchangeRuleResponseBody(name='body'),
}

async function updatePointExchangeRuleWithOptions(request: UpdatePointExchangeRuleRequest, runtime: Util.RuntimeOptions): UpdatePointExchangeRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.couponTemplateIdList)) {
    body['CouponTemplateIdList'] = request.couponTemplateIdList;
  }
  if (!Util.isUnset(request.pointAmount)) {
    body['PointAmount'] = request.pointAmount;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.ruleId)) {
    body['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleName)) {
    body['RuleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdatePointExchangeRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updatePointExchangeRule(request: UpdatePointExchangeRuleRequest): UpdatePointExchangeRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePointExchangeRuleWithOptions(request, runtime);
}

model UpdatePointGrantRuleRequest {
  bizId?: string(name='BizId'),
  pointAmount?: long(name='PointAmount'),
  startAmount?: string(name='StartAmount'),
  status?: long(name='Status'),
  type?: string(name='Type'),
  typeCode?: int32(name='TypeCode'),
  userId?: long(name='UserId'),
}

model UpdatePointGrantRuleResponseBody = {
  code?: string(name='Code'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdatePointGrantRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdatePointGrantRuleResponseBody(name='body'),
}

async function updatePointGrantRuleWithOptions(request: UpdatePointGrantRuleRequest, runtime: Util.RuntimeOptions): UpdatePointGrantRuleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.pointAmount)) {
    body['PointAmount'] = request.pointAmount;
  }
  if (!Util.isUnset(request.startAmount)) {
    body['StartAmount'] = request.startAmount;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.typeCode)) {
    body['TypeCode'] = request.typeCode;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdatePointGrantRule',
    version = '2021-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updatePointGrantRule(request: UpdatePointGrantRuleRequest): UpdatePointGrantRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePointGrantRuleWithOptions(request, runtime);
}

